package lab01;

/**
 * Created by JAVA on 2017/10/5.
 */
public class Test11 {
    public static void main(String args[]) {
        int i = 2; //i 即为所求素数
        int sum=0;//累计输出了多少个数
        for (i = 2; i <= 100; i = i + 1) {
            boolean f = true;
            for (int j = 2; j < i; j++) {
                if (i % j == 0) {
                    f = false;
                    break;
                }
            }
            if (f) {

                System.out.print("i= " + i+"\t");
                sum=sum+1;
                if (sum%5==0) {
                    System.out.println();
                }
                }
            }
        }
    }

